<template>
  <!-- 申请记录 -->
  <div style="padding:20px 20px;" >
<!--    <el-card class="xiu_box">-->

      <el-tabs type="border-card" @tab-click="clfn">
        <el-tab-pane label="申请出库记录"><applice ref="applice1" :urlitem="urlitem"></applice></el-tab-pane>
        <el-tab-pane label="申请采购记录"><applice ref="applice2" :urlitem="urlitem"></applice></el-tab-pane>
      </el-tabs>

<!--    </el-card>-->
  </div>
</template>

<script>

  import applice from './application.vue'
  export default {
    components: {applice},//声明子组件
    computed:{},
    data(){
      return {
        urlitem:'申请出库记录',//0为申请物料记录 1为申请采购记录
      }
    },
    methods:{
      clfn(i){
        console.log(i.label);
         this.urlitem = i.label;
         (i.label=='申请采购记录')?this.$refs.applice2.git_act(1):this.$refs.applice1.git_act(0);
      }
    },
    mounted(){
      // this.git_act();//获取数据
      // this.urlitem = 0;
      this.$refs.applice1.git_act(0)//获取数据
    },
  }
</script>

<style scoped="scoped">
  .xiu_box{width: 100%;}
  .btn{padding:10px 5px;}

</style>
